home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 235 / Issue 235 - September 2007 - DPCS0907DVD.ISO / Extras / NetObjects Fusion / NOF10.exe / data1.cab / FSI / lib / nof / dialogs / StatusDlg.js < prev   
Encoding:
Text File  |  2007-04-11  |  3.3 KB  |  108 lines

  1. /****i* SOURCE_FILE/INFO
  2.   *
  3.   * NAME
  4.   * StatusDlg.js
  5.   *
  6.   * USAGE
  7.   *  Part of Netobjects JavaScript Library.
  8.   *
  9.   * COPYRIGHT
  10.   *  Copyright ⌐ 2000-2005 Website Pros, Inc.
  11.   *  All Rights Reserved.
  12.   *
  13.   *  This is an unpublished work protected by Website Pros, Inc.
  14.   *  as a trade secret, and is not to be used or disclosed except as
  15.   *  expressly provided in a written license agreement executed by
  16.   *  you and Website Pros, Inc.
  17.   *
  18.   *      <copyright@websitepros.com>
  19.   *
  20.   * NOTES
  21.   *  JavaScript code.
  22.   *
  23.   *****/
  24.  
  25. if (!IS.isModuleInitialized("IS.NOF.DIALOGS.StatusDlg"))
  26. {
  27.   
  28.   /****h* NOF_JavaScript_Library/NOF.DIALOGS.StatusDlg
  29.     *
  30.     * NAME
  31.     *  NOF.DIALOGS.StatusDlg
  32.     *
  33.     * DESCRIPTION
  34.     *    
  35.     * The <code>StatusDlg</code> class
  36.     * External dependencies: NOF.App
  37.     ****/
  38.   
  39.   /**
  40.     * constructor   
  41.     **/ 
  42.   function DIALOGS_StatusDlg() {
  43.     this.__proto__ = DIALOGS_StatusDlg.prototype;            
  44.   }
  45.   {
  46.     var member = DIALOGS_StatusDlg.prototype;    
  47.     member.CLASS_NAME            = "DIALOGS.StatusDlg";
  48.     
  49.     var method = DIALOGS_StatusDlg.prototype;    
  50.     /*
  51.       open(String pTitle, String pText)
  52.       boolean setText(String pText)
  53.       boolean close(int pTimeout)
  54.     */        
  55.     
  56.     /**
  57.     * Opens a non-modal dialog that can contain a status message. 
  58.     * The purpose is to show status information while performing potentially lengthy operations
  59.     * within an script. The dialog can be closed by calling close.
  60.     * If a status dialog is alreay open that dialog will be modified, i.e. this will not open a new status dialog.
  61.     * The dialog contains a cancel button. The state of the cancel button can be checked 
  62.     * by calling the functions setText and close.
  63.     *
  64.     * @param title specifies the text displayed in the title bar of the dialog.
  65.     * @param text specifies the text displayed in the dialog. Up to four lines of text can be displayed.          
  66.     **/
  67.     method.open = function (/*String*/ title,/*String*/ text) {             
  68.       NOF.App.getFSIApp().OpenStatusDialog(title, text);                                
  69.     }
  70.  
  71.     /**
  72.     * Closes the status dialog.
  73.     *
  74.     * @param pTimeout specifies a number of milliseconds to wait before closing the dialog.
  75.     * @return true if the user has clicked the cancel button, otherwise it will return false.
  76.     **/
  77.     method.close = function (/*int*/ pTimeout) {             
  78.       return NOF.App.getFSIApp().CloseStatusDialog(pTimeout);                                
  79.     }
  80.  
  81.     /**
  82.     * Replaces the text in the status dialog.
  83.     *
  84.     * @param text specifies the new text to be displayed in the dialog.
  85.     * @return true if the user has clicked the cancel button, otherwise it will return false.
  86.     **/
  87.     method.setText = function (/*String*/ text) {             
  88.       return NOF.App.getFSIApp().StatusDialogText(text);                                
  89.     }
  90.         
  91.         /**
  92.         * Show the status dialog. It is neccessary to be called (in order to show
  93.         * the dialog) only in the case which the dialog was previously hiden.
  94.         **/
  95.         method.show = function () {             
  96.             return NOF.App.getFSIApp2().SetShowStatusDialog(true);                                
  97.         }
  98.         
  99.         /**
  100.         * Hide the status dialog. 
  101.         **/
  102.         method.hide = function () {             
  103.             return NOF.App.getFSIApp2().SetShowStatusDialog(false);                        
  104.         }
  105.         
  106.   }
  107.   DIALOGS.__proto__.StatusDlg = DIALOGS_StatusDlg;
  108. }